{
 "nbformat": 4,
 "nbformat_minor": 2,
 "metadata": {
  "language_info": {
   "name": "python",
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "version": "3.7.7-final"
  },
  "orig_nbformat": 2,
  "file_extension": ".py",
  "mimetype": "text/x-python",
  "name": "python",
  "npconvert_exporter": "python",
  "pygments_lexer": "ipython3",
  "version": 3,
  "kernelspec": {
   "name": "python3",
   "display_name": "Python 3"
  }
 },
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "info=pd.read_csv('./meal_order_info.csv',encoding=\"gbk\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "     info_id  emp_id  number_consumers  mode  dining_table_id  \\\n0        417    1442                 4   NaN             1501   \n1        301    1095                 3   NaN             1430   \n2        413    1147                 6   NaN             1488   \n3        415    1166                 4   NaN             1502   \n4        392    1094                10   NaN             1499   \n..       ...     ...               ...   ...              ...   \n940      641    1095                 8   NaN             1492   \n941      672    1089                 6   NaN             1489   \n942      692    1155                 8   NaN             1492   \n943      647    1094                 4   NaN             1485   \n944      570    1113                 8   NaN             1517   \n\n     dining_table_name  expenditure  dishes_count  accounts_payable  \\\n0                 1022          165             5               165   \n1                 1031          321             6               321   \n2                 1009          854            15               854   \n3                 1023          466            10               466   \n4                 1020          704            24               704   \n..                 ...          ...           ...               ...   \n940               1013          679            12               679   \n941               1010          800            24               800   \n942               1013          735            10               735   \n943               1006          262             9               262   \n944               1038          589            13               589   \n\n         use_start_time  ...           lock_time cashier_id  pc_id  \\\n0     2016/8/1 11:05:36  ...   2016/8/1 11:11:46        NaN    NaN   \n1     2016/8/1 11:15:57  ...   2016/8/1 11:31:55        NaN    NaN   \n2     2016/8/1 12:42:52  ...   2016/8/1 12:54:37        NaN    NaN   \n3     2016/8/1 12:51:38  ...   2016/8/1 13:08:20        NaN    NaN   \n4     2016/8/1 12:58:44  ...   2016/8/1 13:07:16        NaN    NaN   \n..                  ...  ...                 ...        ...    ...   \n940  2016/8/31 21:23:48  ...  2016/8/31 21:31:48        NaN    NaN   \n941  2016/8/31 21:24:12  ...  2016/8/31 21:56:12        NaN    NaN   \n942  2016/8/31 21:25:18  ...  2016/8/31 21:33:34        NaN    NaN   \n943  2016/8/31 21:37:39  ...  2016/8/31 21:55:39        NaN    NaN   \n944  2016/8/31 21:41:56  ...  2016/8/31 21:32:56        NaN    NaN   \n\n     order_number  org_id  print_doc_bill_num  lock_table_info  order_status  \\\n0             NaN     330                 NaN              NaN             1   \n1             NaN     328                 NaN              NaN             1   \n2             NaN     330                 NaN              NaN             1   \n3             NaN     330                 NaN              NaN             1   \n4             NaN     330                 NaN              NaN             1   \n..            ...     ...                 ...              ...           ...   \n940           NaN     330                 NaN              NaN             1   \n941           NaN     330                 NaN              NaN             1   \n942           NaN     330                 NaN              NaN             1   \n943           NaN     330                 NaN              NaN             1   \n944           NaN     330                 NaN              NaN             1   \n\n           phone  name  \n0    18688880641   苗宇怡  \n1    18688880174    赵颖  \n2    18688880276   徐毅凡  \n3    18688880231   张大鹏  \n4    18688880173   孙熙凯  \n..           ...   ...  \n940  18688880307    李靖  \n941  18688880305    莫言  \n942  18688880327   习一冰  \n943  18688880207   章春华  \n944  18688880313   唐雅嘉  \n\n[945 rows x 21 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>info_id</th>\n      <th>emp_id</th>\n      <th>number_consumers</th>\n      <th>mode</th>\n      <th>dining_table_id</th>\n      <th>dining_table_name</th>\n      <th>expenditure</th>\n      <th>dishes_count</th>\n      <th>accounts_payable</th>\n      <th>use_start_time</th>\n      <th>...</th>\n      <th>lock_time</th>\n      <th>cashier_id</th>\n      <th>pc_id</th>\n      <th>order_number</th>\n      <th>org_id</th>\n      <th>print_doc_bill_num</th>\n      <th>lock_table_info</th>\n      <th>order_status</th>\n      <th>phone</th>\n      <th>name</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>417</td>\n      <td>1442</td>\n      <td>4</td>\n      <td>NaN</td>\n      <td>1501</td>\n      <td>1022</td>\n      <td>165</td>\n      <td>5</td>\n      <td>165</td>\n      <td>2016/8/1 11:05:36</td>\n      <td>...</td>\n      <td>2016/8/1 11:11:46</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>330</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>1</td>\n      <td>18688880641</td>\n      <td>苗宇怡</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>301</td>\n      <td>1095</td>\n      <td>3</td>\n      <td>NaN</td>\n      <td>1430</td>\n      <td>1031</td>\n      <td>321</td>\n      <td>6</td>\n      <td>321</td>\n      <td>2016/8/1 11:15:57</td>\n      <td>...</td>\n      <td>2016/8/1 11:31:55</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>328</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>1</td>\n      <td>18688880174</td>\n      <td>赵颖</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>413</td>\n      <td>1147</td>\n      <td>6</td>\n      <td>NaN</td>\n      <td>1488</td>\n      <td>1009</td>\n      <td>854</td>\n      <td>15</td>\n      <td>854</td>\n      <td>2016/8/1 12:42:52</td>\n      <td>...</td>\n      <td>2016/8/1 12:54:37</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>330</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>1</td>\n      <td>18688880276</td>\n      <td>徐毅凡</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>415</td>\n      <td>1166</td>\n      <td>4</td>\n      <td>NaN</td>\n      <td>1502</td>\n      <td>1023</td>\n      <td>466</td>\n      <td>10</td>\n      <td>466</td>\n      <td>2016/8/1 12:51:38</td>\n      <td>...</td>\n      <td>2016/8/1 13:08:20</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>330</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>1</td>\n      <td>18688880231</td>\n      <td>张大鹏</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>392</td>\n      <td>1094</td>\n      <td>10</td>\n      <td>NaN</td>\n      <td>1499</td>\n      <td>1020</td>\n      <td>704</td>\n      <td>24</td>\n      <td>704</td>\n      <td>2016/8/1 12:58:44</td>\n      <td>...</td>\n      <td>2016/8/1 13:07:16</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>330</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>1</td>\n      <td>18688880173</td>\n      <td>孙熙凯</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>940</th>\n      <td>641</td>\n      <td>1095</td>\n      <td>8</td>\n      <td>NaN</td>\n      <td>1492</td>\n      <td>1013</td>\n      <td>679</td>\n      <td>12</td>\n      <td>679</td>\n      <td>2016/8/31 21:23:48</td>\n      <td>...</td>\n      <td>2016/8/31 21:31:48</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>330</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>1</td>\n      <td>18688880307</td>\n      <td>李靖</td>\n    </tr>\n    <tr>\n      <th>941</th>\n      <td>672</td>\n      <td>1089</td>\n      <td>6</td>\n      <td>NaN</td>\n      <td>1489</td>\n      <td>1010</td>\n      <td>800</td>\n      <td>24</td>\n      <td>800</td>\n      <td>2016/8/31 21:24:12</td>\n      <td>...</td>\n      <td>2016/8/31 21:56:12</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>330</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>1</td>\n      <td>18688880305</td>\n      <td>莫言</td>\n    </tr>\n    <tr>\n      <th>942</th>\n      <td>692</td>\n      <td>1155</td>\n      <td>8</td>\n      <td>NaN</td>\n      <td>1492</td>\n      <td>1013</td>\n      <td>735</td>\n      <td>10</td>\n      <td>735</td>\n      <td>2016/8/31 21:25:18</td>\n      <td>...</td>\n      <td>2016/8/31 21:33:34</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>330</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>1</td>\n      <td>18688880327</td>\n      <td>习一冰</td>\n    </tr>\n    <tr>\n      <th>943</th>\n      <td>647</td>\n      <td>1094</td>\n      <td>4</td>\n      <td>NaN</td>\n      <td>1485</td>\n      <td>1006</td>\n      <td>262</td>\n      <td>9</td>\n      <td>262</td>\n      <td>2016/8/31 21:37:39</td>\n      <td>...</td>\n      <td>2016/8/31 21:55:39</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>330</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>1</td>\n      <td>18688880207</td>\n      <td>章春华</td>\n    </tr>\n    <tr>\n      <th>944</th>\n      <td>570</td>\n      <td>1113</td>\n      <td>8</td>\n      <td>NaN</td>\n      <td>1517</td>\n      <td>1038</td>\n      <td>589</td>\n      <td>13</td>\n      <td>589</td>\n      <td>2016/8/31 21:41:56</td>\n      <td>...</td>\n      <td>2016/8/31 21:32:56</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>330</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>1</td>\n      <td>18688880313</td>\n      <td>唐雅嘉</td>\n    </tr>\n  </tbody>\n</table>\n<p>945 rows × 21 columns</p>\n</div>"
     },
     "metadata": {},
     "execution_count": 9
    }
   ],
   "source": [
    "info"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 横向连接"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "     info_id  emp_id  number_consumers  mode  dining_table_id  \\\n0        417    1442                 4   NaN             1501   \n1        301    1095                 3   NaN             1430   \n2        413    1147                 6   NaN             1488   \n3        415    1166                 4   NaN             1502   \n4        392    1094                10   NaN             1499   \n..       ...     ...               ...   ...              ...   \n940      641    1095                 8   NaN             1492   \n941      672    1089                 6   NaN             1489   \n942      692    1155                 8   NaN             1492   \n943      647    1094                 4   NaN             1485   \n944      570    1113                 8   NaN             1517   \n\n     dining_table_name  expenditure  dishes_count  accounts_payable  \\\n0                 1022          165             5               165   \n1                 1031          321             6               321   \n2                 1009          854            15               854   \n3                 1023          466            10               466   \n4                 1020          704            24               704   \n..                 ...          ...           ...               ...   \n940               1013          679            12               679   \n941               1010          800            24               800   \n942               1013          735            10               735   \n943               1006          262             9               262   \n944               1038          589            13               589   \n\n         use_start_time  ...           lock_time cashier_id  pc_id  \\\n0     2016/8/1 11:05:36  ...   2016/8/1 11:11:46        NaN    NaN   \n1     2016/8/1 11:15:57  ...   2016/8/1 11:31:55        NaN    NaN   \n2     2016/8/1 12:42:52  ...   2016/8/1 12:54:37        NaN    NaN   \n3     2016/8/1 12:51:38  ...   2016/8/1 13:08:20        NaN    NaN   \n4     2016/8/1 12:58:44  ...   2016/8/1 13:07:16        NaN    NaN   \n..                  ...  ...                 ...        ...    ...   \n940  2016/8/31 21:23:48  ...  2016/8/31 21:31:48        NaN    NaN   \n941  2016/8/31 21:24:12  ...  2016/8/31 21:56:12        NaN    NaN   \n942  2016/8/31 21:25:18  ...  2016/8/31 21:33:34        NaN    NaN   \n943  2016/8/31 21:37:39  ...  2016/8/31 21:55:39        NaN    NaN   \n944  2016/8/31 21:41:56  ...  2016/8/31 21:32:56        NaN    NaN   \n\n     order_number  org_id  print_doc_bill_num  lock_table_info  order_status  \\\n0             NaN     330                 NaN              NaN             1   \n1             NaN     328                 NaN              NaN             1   \n2             NaN     330                 NaN              NaN             1   \n3             NaN     330                 NaN              NaN             1   \n4             NaN     330                 NaN              NaN             1   \n..            ...     ...                 ...              ...           ...   \n940           NaN     330                 NaN              NaN             1   \n941           NaN     330                 NaN              NaN             1   \n942           NaN     330                 NaN              NaN             1   \n943           NaN     330                 NaN              NaN             1   \n944           NaN     330                 NaN              NaN             1   \n\n           phone  name  \n0    18688880641   苗宇怡  \n1    18688880174    赵颖  \n2    18688880276   徐毅凡  \n3    18688880231   张大鹏  \n4    18688880173   孙熙凯  \n..           ...   ...  \n940  18688880307    李靖  \n941  18688880305    莫言  \n942  18688880327   习一冰  \n943  18688880207   章春华  \n944  18688880313   唐雅嘉  \n\n[945 rows x 21 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>info_id</th>\n      <th>emp_id</th>\n      <th>number_consumers</th>\n      <th>mode</th>\n      <th>dining_table_id</th>\n      <th>dining_table_name</th>\n      <th>expenditure</th>\n      <th>dishes_count</th>\n      <th>accounts_payable</th>\n      <th>use_start_time</th>\n      <th>...</th>\n      <th>lock_time</th>\n      <th>cashier_id</th>\n      <th>pc_id</th>\n      <th>order_number</th>\n      <th>org_id</th>\n      <th>print_doc_bill_num</th>\n      <th>lock_table_info</th>\n      <th>order_status</th>\n      <th>phone</th>\n      <th>name</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>417</td>\n      <td>1442</td>\n      <td>4</td>\n      <td>NaN</td>\n      <td>1501</td>\n      <td>1022</td>\n      <td>165</td>\n      <td>5</td>\n      <td>165</td>\n      <td>2016/8/1 11:05:36</td>\n      <td>...</td>\n      <td>2016/8/1 11:11:46</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>330</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>1</td>\n      <td>18688880641</td>\n      <td>苗宇怡</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>301</td>\n      <td>1095</td>\n      <td>3</td>\n      <td>NaN</td>\n      <td>1430</td>\n      <td>1031</td>\n      <td>321</td>\n      <td>6</td>\n      <td>321</td>\n      <td>2016/8/1 11:15:57</td>\n      <td>...</td>\n      <td>2016/8/1 11:31:55</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>328</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>1</td>\n      <td>18688880174</td>\n      <td>赵颖</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>413</td>\n      <td>1147</td>\n      <td>6</td>\n      <td>NaN</td>\n      <td>1488</td>\n      <td>1009</td>\n      <td>854</td>\n      <td>15</td>\n      <td>854</td>\n      <td>2016/8/1 12:42:52</td>\n      <td>...</td>\n      <td>2016/8/1 12:54:37</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>330</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>1</td>\n      <td>18688880276</td>\n      <td>徐毅凡</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>415</td>\n      <td>1166</td>\n      <td>4</td>\n      <td>NaN</td>\n      <td>1502</td>\n      <td>1023</td>\n      <td>466</td>\n      <td>10</td>\n      <td>466</td>\n      <td>2016/8/1 12:51:38</td>\n      <td>...</td>\n      <td>2016/8/1 13:08:20</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>330</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>1</td>\n      <td>18688880231</td>\n      <td>张大鹏</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>392</td>\n      <td>1094</td>\n      <td>10</td>\n      <td>NaN</td>\n      <td>1499</td>\n      <td>1020</td>\n      <td>704</td>\n      <td>24</td>\n      <td>704</td>\n      <td>2016/8/1 12:58:44</td>\n      <td>...</td>\n      <td>2016/8/1 13:07:16</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>330</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>1</td>\n      <td>18688880173</td>\n      <td>孙熙凯</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>940</th>\n      <td>641</td>\n      <td>1095</td>\n      <td>8</td>\n      <td>NaN</td>\n      <td>1492</td>\n      <td>1013</td>\n      <td>679</td>\n      <td>12</td>\n      <td>679</td>\n      <td>2016/8/31 21:23:48</td>\n      <td>...</td>\n      <td>2016/8/31 21:31:48</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>330</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>1</td>\n      <td>18688880307</td>\n      <td>李靖</td>\n    </tr>\n    <tr>\n      <th>941</th>\n      <td>672</td>\n      <td>1089</td>\n      <td>6</td>\n      <td>NaN</td>\n      <td>1489</td>\n      <td>1010</td>\n      <td>800</td>\n      <td>24</td>\n      <td>800</td>\n      <td>2016/8/31 21:24:12</td>\n      <td>...</td>\n      <td>2016/8/31 21:56:12</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>330</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>1</td>\n      <td>18688880305</td>\n      <td>莫言</td>\n    </tr>\n    <tr>\n      <th>942</th>\n      <td>692</td>\n      <td>1155</td>\n      <td>8</td>\n      <td>NaN</td>\n      <td>1492</td>\n      <td>1013</td>\n      <td>735</td>\n      <td>10</td>\n      <td>735</td>\n      <td>2016/8/31 21:25:18</td>\n      <td>...</td>\n      <td>2016/8/31 21:33:34</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>330</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>1</td>\n      <td>18688880327</td>\n      <td>习一冰</td>\n    </tr>\n    <tr>\n      <th>943</th>\n      <td>647</td>\n      <td>1094</td>\n      <td>4</td>\n      <td>NaN</td>\n      <td>1485</td>\n      <td>1006</td>\n      <td>262</td>\n      <td>9</td>\n      <td>262</td>\n      <td>2016/8/31 21:37:39</td>\n      <td>...</td>\n      <td>2016/8/31 21:55:39</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>330</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>1</td>\n      <td>18688880207</td>\n      <td>章春华</td>\n    </tr>\n    <tr>\n      <th>944</th>\n      <td>570</td>\n      <td>1113</td>\n      <td>8</td>\n      <td>NaN</td>\n      <td>1517</td>\n      <td>1038</td>\n      <td>589</td>\n      <td>13</td>\n      <td>589</td>\n      <td>2016/8/31 21:41:56</td>\n      <td>...</td>\n      <td>2016/8/31 21:32:56</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>330</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>1</td>\n      <td>18688880313</td>\n      <td>唐雅嘉</td>\n    </tr>\n  </tbody>\n</table>\n<p>945 rows × 21 columns</p>\n</div>"
     },
     "metadata": {},
     "execution_count": 12
    }
   ],
   "source": [
    "a=info.iloc[:,:10]\n",
    "b=info.iloc[:,10:]\n",
    "pd.concat([a,b],axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "a    0\nb    1\nc    2\ndtype: int64"
     },
     "metadata": {},
     "execution_count": 17
    }
   ],
   "source": [
    "s1=pd.Series([0,1,2],index=['a','b','c'])\n",
    "s1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "c    3\nd    4\ndtype: int64"
     },
     "metadata": {},
     "execution_count": 18
    }
   ],
   "source": [
    "s2=pd.Series([3,4],index=['c','d'])\n",
    "s2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "   0  1\nc  2  3",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>0</th>\n      <th>1</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>c</th>\n      <td>2</td>\n      <td>3</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "metadata": {},
     "execution_count": 20
    }
   ],
   "source": [
    "pd.concat([s1,s2],axis=1,join='inner')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 纵向连接"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "detail1=pd.read_excel('./meal_order_detail.xlsx','meal_order_detail1')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "      detail_id  order_id  dishes_id  logicprn_name  parent_class_name  \\\n0          2956       417     610062            NaN                NaN   \n1          2958       417     609957            NaN                NaN   \n2          2961       417     609950            NaN                NaN   \n3          2966       417     610038            NaN                NaN   \n4          2968       417     610003            NaN                NaN   \n...         ...       ...        ...            ...                ...   \n2774       6750       774     610011            NaN                NaN   \n2775       6742       774     609996            NaN                NaN   \n2776       6756       774     609949            NaN                NaN   \n2777       6763       774     610014            NaN                NaN   \n2778       6764       774     610017            NaN                NaN   \n\n            dishes_name  itemis_add  counts  amounts  cost  \\\n0                  蒜蓉生蚝           0       1       49   NaN   \n1     蒙古烤羊腿\\r\\n\\r\\n\\r\\n           0       1       48   NaN   \n2                  大蒜苋菜           0       1       30   NaN   \n3                 芝麻烤紫菜           0       1       25   NaN   \n4                   蒜香包           0       1       13   NaN   \n...                 ...         ...     ...      ...   ...   \n2774              白饭/大碗           0       1       10   NaN   \n2775                牛尾汤           0       1       40   NaN   \n2776             意文柠檬汁            0       1       13   NaN   \n2777               金玉良缘           0       1       30   NaN   \n2778               酸辣藕丁           0       1       33   NaN   \n\n        place_order_time  discount_amt  discount_reason  kick_back  \\\n0    2016-08-01 11:05:36           NaN              NaN        NaN   \n1    2016-08-01 11:07:07           NaN              NaN        NaN   \n2    2016-08-01 11:07:40           NaN              NaN        NaN   \n3    2016-08-01 11:11:11           NaN              NaN        NaN   \n4    2016-08-01 11:11:30           NaN              NaN        NaN   \n...                  ...           ...              ...        ...   \n2774 2016-08-10 21:56:24           NaN              NaN        NaN   \n2775 2016-08-10 21:56:48           NaN              NaN        NaN   \n2776 2016-08-10 22:01:52           NaN              NaN        NaN   \n2777 2016-08-10 22:03:58           NaN              NaN        NaN   \n2778 2016-08-10 22:04:30           NaN              NaN        NaN   \n\n      add_inprice  add_info  bar_code      picture_file  emp_id  \n0               0       NaN       NaN  caipu/104001.jpg    1442  \n1               0       NaN       NaN  caipu/202003.jpg    1442  \n2               0       NaN       NaN  caipu/303001.jpg    1442  \n3               0       NaN       NaN  caipu/105002.jpg    1442  \n4               0       NaN       NaN  caipu/503002.jpg    1442  \n...           ...       ...       ...               ...     ...  \n2774            0       NaN       NaN  caipu/601005.jpg    1138  \n2775            0       NaN       NaN  caipu/201006.jpg    1138  \n2776            0       NaN       NaN  caipu/404005.jpg    1138  \n2777            0       NaN       NaN  caipu/302003.jpg    1138  \n2778            0       NaN       NaN  caipu/302006.jpg    1138  \n\n[2779 rows x 19 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>detail_id</th>\n      <th>order_id</th>\n      <th>dishes_id</th>\n      <th>logicprn_name</th>\n      <th>parent_class_name</th>\n      <th>dishes_name</th>\n      <th>itemis_add</th>\n      <th>counts</th>\n      <th>amounts</th>\n      <th>cost</th>\n      <th>place_order_time</th>\n      <th>discount_amt</th>\n      <th>discount_reason</th>\n      <th>kick_back</th>\n      <th>add_inprice</th>\n      <th>add_info</th>\n      <th>bar_code</th>\n      <th>picture_file</th>\n      <th>emp_id</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>2956</td>\n      <td>417</td>\n      <td>610062</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>蒜蓉生蚝</td>\n      <td>0</td>\n      <td>1</td>\n      <td>49</td>\n      <td>NaN</td>\n      <td>2016-08-01 11:05:36</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/104001.jpg</td>\n      <td>1442</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>2958</td>\n      <td>417</td>\n      <td>609957</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>蒙古烤羊腿\\r\\n\\r\\n\\r\\n</td>\n      <td>0</td>\n      <td>1</td>\n      <td>48</td>\n      <td>NaN</td>\n      <td>2016-08-01 11:07:07</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/202003.jpg</td>\n      <td>1442</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>2961</td>\n      <td>417</td>\n      <td>609950</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>大蒜苋菜</td>\n      <td>0</td>\n      <td>1</td>\n      <td>30</td>\n      <td>NaN</td>\n      <td>2016-08-01 11:07:40</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/303001.jpg</td>\n      <td>1442</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>2966</td>\n      <td>417</td>\n      <td>610038</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>芝麻烤紫菜</td>\n      <td>0</td>\n      <td>1</td>\n      <td>25</td>\n      <td>NaN</td>\n      <td>2016-08-01 11:11:11</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/105002.jpg</td>\n      <td>1442</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>2968</td>\n      <td>417</td>\n      <td>610003</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>蒜香包</td>\n      <td>0</td>\n      <td>1</td>\n      <td>13</td>\n      <td>NaN</td>\n      <td>2016-08-01 11:11:30</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/503002.jpg</td>\n      <td>1442</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>2774</th>\n      <td>6750</td>\n      <td>774</td>\n      <td>610011</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>白饭/大碗</td>\n      <td>0</td>\n      <td>1</td>\n      <td>10</td>\n      <td>NaN</td>\n      <td>2016-08-10 21:56:24</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/601005.jpg</td>\n      <td>1138</td>\n    </tr>\n    <tr>\n      <th>2775</th>\n      <td>6742</td>\n      <td>774</td>\n      <td>609996</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>牛尾汤</td>\n      <td>0</td>\n      <td>1</td>\n      <td>40</td>\n      <td>NaN</td>\n      <td>2016-08-10 21:56:48</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/201006.jpg</td>\n      <td>1138</td>\n    </tr>\n    <tr>\n      <th>2776</th>\n      <td>6756</td>\n      <td>774</td>\n      <td>609949</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>意文柠檬汁</td>\n      <td>0</td>\n      <td>1</td>\n      <td>13</td>\n      <td>NaN</td>\n      <td>2016-08-10 22:01:52</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/404005.jpg</td>\n      <td>1138</td>\n    </tr>\n    <tr>\n      <th>2777</th>\n      <td>6763</td>\n      <td>774</td>\n      <td>610014</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>金玉良缘</td>\n      <td>0</td>\n      <td>1</td>\n      <td>30</td>\n      <td>NaN</td>\n      <td>2016-08-10 22:03:58</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/302003.jpg</td>\n      <td>1138</td>\n    </tr>\n    <tr>\n      <th>2778</th>\n      <td>6764</td>\n      <td>774</td>\n      <td>610017</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>酸辣藕丁</td>\n      <td>0</td>\n      <td>1</td>\n      <td>33</td>\n      <td>NaN</td>\n      <td>2016-08-10 22:04:30</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/302006.jpg</td>\n      <td>1138</td>\n    </tr>\n  </tbody>\n</table>\n<p>2779 rows × 19 columns</p>\n</div>"
     },
     "metadata": {},
     "execution_count": 27
    }
   ],
   "source": [
    "detail1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "      detail_id  order_id  dishes_id  logicprn_name  parent_class_name  \\\n0          2352       366     609967            NaN                NaN   \n1          2354       366     609961            NaN                NaN   \n2          2356       366     606000            NaN                NaN   \n3          2358       366     606106            NaN                NaN   \n4          2361       366     610003            NaN                NaN   \n...         ...       ...        ...            ...                ...   \n3642       3856      1125     610011            NaN                NaN   \n3643       3857      1125     610020            NaN                NaN   \n3644       3858      1125     610048            NaN                NaN   \n3645       3859      1125     609996            NaN                NaN   \n3646       3860      1125     610018            NaN                NaN   \n\n           dishes_name  itemis_add  counts  amounts  cost    place_order_time  \\\n0               香酥两吃大虾           0       1       89   NaN 2016-08-11 11:49:43   \n1                姜葱炒花蟹           0       1       45   NaN 2016-08-11 11:51:17   \n2     香烤牛排\\r\\n\\r\\n\\r\\n           0       1       55   NaN 2016-08-11 11:52:48   \n3                 铁板牛肉           0       1       66   NaN 2016-08-11 11:53:47   \n4                  蒜香包           0       1       13   NaN 2016-08-11 11:54:12   \n...                ...         ...     ...      ...   ...                 ...   \n3642             白饭/大碗           0       1       10   NaN 2016-08-20 22:06:33   \n3643  泡椒凤爪\\r\\n\\r\\n\\r\\n           0       1       58   NaN 2016-08-20 22:07:31   \n3644              拌土豆丝           0       1       25   NaN 2016-08-20 22:07:47   \n3645               牛尾汤           0       1       40   NaN 2016-08-20 22:08:38   \n3646  照烧鸡腿\\r\\n\\r\\n\\r\\n           0       1       16   NaN 2016-08-20 22:09:17   \n\n      discount_amt  discount_reason  kick_back  add_inprice  add_info  \\\n0              NaN              NaN        NaN            0       NaN   \n1              NaN              NaN        NaN            0       NaN   \n2              NaN              NaN        NaN            0       NaN   \n3              NaN              NaN        NaN            0       NaN   \n4              NaN              NaN        NaN            0       NaN   \n...            ...              ...        ...          ...       ...   \n3642           NaN              NaN        NaN            0       NaN   \n3643           NaN              NaN        NaN            0       NaN   \n3644           NaN              NaN        NaN            0       NaN   \n3645           NaN              NaN        NaN            0       NaN   \n3646           NaN              NaN        NaN            0       NaN   \n\n      bar_code               picture_file  emp_id  \n0          NaN           caipu/101002.jpg    1159  \n1          NaN           caipu/102001.jpg    1159  \n2          NaN           caipu/201001.jpg    1159  \n3          NaN  /jsp/pc/images/606106.jpg    1159  \n4          NaN           caipu/503002.jpg    1159  \n...        ...                        ...     ...  \n3642       NaN           caipu/601005.jpg    1110  \n3643       NaN           caipu/204003.jpg    1110  \n3644       NaN           caipu/301002.jpg    1110  \n3645       NaN           caipu/201006.jpg    1110  \n3646       NaN           caipu/204001.jpg    1110  \n\n[3647 rows x 19 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>detail_id</th>\n      <th>order_id</th>\n      <th>dishes_id</th>\n      <th>logicprn_name</th>\n      <th>parent_class_name</th>\n      <th>dishes_name</th>\n      <th>itemis_add</th>\n      <th>counts</th>\n      <th>amounts</th>\n      <th>cost</th>\n      <th>place_order_time</th>\n      <th>discount_amt</th>\n      <th>discount_reason</th>\n      <th>kick_back</th>\n      <th>add_inprice</th>\n      <th>add_info</th>\n      <th>bar_code</th>\n      <th>picture_file</th>\n      <th>emp_id</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>2352</td>\n      <td>366</td>\n      <td>609967</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>香酥两吃大虾</td>\n      <td>0</td>\n      <td>1</td>\n      <td>89</td>\n      <td>NaN</td>\n      <td>2016-08-11 11:49:43</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/101002.jpg</td>\n      <td>1159</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>2354</td>\n      <td>366</td>\n      <td>609961</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>姜葱炒花蟹</td>\n      <td>0</td>\n      <td>1</td>\n      <td>45</td>\n      <td>NaN</td>\n      <td>2016-08-11 11:51:17</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/102001.jpg</td>\n      <td>1159</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>2356</td>\n      <td>366</td>\n      <td>606000</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>香烤牛排\\r\\n\\r\\n\\r\\n</td>\n      <td>0</td>\n      <td>1</td>\n      <td>55</td>\n      <td>NaN</td>\n      <td>2016-08-11 11:52:48</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/201001.jpg</td>\n      <td>1159</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>2358</td>\n      <td>366</td>\n      <td>606106</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>铁板牛肉</td>\n      <td>0</td>\n      <td>1</td>\n      <td>66</td>\n      <td>NaN</td>\n      <td>2016-08-11 11:53:47</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>/jsp/pc/images/606106.jpg</td>\n      <td>1159</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>2361</td>\n      <td>366</td>\n      <td>610003</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>蒜香包</td>\n      <td>0</td>\n      <td>1</td>\n      <td>13</td>\n      <td>NaN</td>\n      <td>2016-08-11 11:54:12</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/503002.jpg</td>\n      <td>1159</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>3642</th>\n      <td>3856</td>\n      <td>1125</td>\n      <td>610011</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>白饭/大碗</td>\n      <td>0</td>\n      <td>1</td>\n      <td>10</td>\n      <td>NaN</td>\n      <td>2016-08-20 22:06:33</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/601005.jpg</td>\n      <td>1110</td>\n    </tr>\n    <tr>\n      <th>3643</th>\n      <td>3857</td>\n      <td>1125</td>\n      <td>610020</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>泡椒凤爪\\r\\n\\r\\n\\r\\n</td>\n      <td>0</td>\n      <td>1</td>\n      <td>58</td>\n      <td>NaN</td>\n      <td>2016-08-20 22:07:31</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/204003.jpg</td>\n      <td>1110</td>\n    </tr>\n    <tr>\n      <th>3644</th>\n      <td>3858</td>\n      <td>1125</td>\n      <td>610048</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>拌土豆丝</td>\n      <td>0</td>\n      <td>1</td>\n      <td>25</td>\n      <td>NaN</td>\n      <td>2016-08-20 22:07:47</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/301002.jpg</td>\n      <td>1110</td>\n    </tr>\n    <tr>\n      <th>3645</th>\n      <td>3859</td>\n      <td>1125</td>\n      <td>609996</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>牛尾汤</td>\n      <td>0</td>\n      <td>1</td>\n      <td>40</td>\n      <td>NaN</td>\n      <td>2016-08-20 22:08:38</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/201006.jpg</td>\n      <td>1110</td>\n    </tr>\n    <tr>\n      <th>3646</th>\n      <td>3860</td>\n      <td>1125</td>\n      <td>610018</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>照烧鸡腿\\r\\n\\r\\n\\r\\n</td>\n      <td>0</td>\n      <td>1</td>\n      <td>16</td>\n      <td>NaN</td>\n      <td>2016-08-20 22:09:17</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/204001.jpg</td>\n      <td>1110</td>\n    </tr>\n  </tbody>\n</table>\n<p>3647 rows × 19 columns</p>\n</div>"
     },
     "metadata": {},
     "execution_count": 29
    }
   ],
   "source": [
    "detail2=pd.read_excel('./meal_order_detail.xlsx','meal_order_detail2')\n",
    "detail2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "      detail_id  order_id  dishes_id  logicprn_name  parent_class_name  \\\n0          2956       417     610062            NaN                NaN   \n1          2958       417     609957            NaN                NaN   \n2          2961       417     609950            NaN                NaN   \n3          2966       417     610038            NaN                NaN   \n4          2968       417     610003            NaN                NaN   \n...         ...       ...        ...            ...                ...   \n3642       3856      1125     610011            NaN                NaN   \n3643       3857      1125     610020            NaN                NaN   \n3644       3858      1125     610048            NaN                NaN   \n3645       3859      1125     609996            NaN                NaN   \n3646       3860      1125     610018            NaN                NaN   \n\n            dishes_name  itemis_add  counts  amounts  cost  \\\n0                  蒜蓉生蚝           0       1       49   NaN   \n1     蒙古烤羊腿\\r\\n\\r\\n\\r\\n           0       1       48   NaN   \n2                  大蒜苋菜           0       1       30   NaN   \n3                 芝麻烤紫菜           0       1       25   NaN   \n4                   蒜香包           0       1       13   NaN   \n...                 ...         ...     ...      ...   ...   \n3642              白饭/大碗           0       1       10   NaN   \n3643   泡椒凤爪\\r\\n\\r\\n\\r\\n           0       1       58   NaN   \n3644               拌土豆丝           0       1       25   NaN   \n3645                牛尾汤           0       1       40   NaN   \n3646   照烧鸡腿\\r\\n\\r\\n\\r\\n           0       1       16   NaN   \n\n        place_order_time  discount_amt  discount_reason  kick_back  \\\n0    2016-08-01 11:05:36           NaN              NaN        NaN   \n1    2016-08-01 11:07:07           NaN              NaN        NaN   \n2    2016-08-01 11:07:40           NaN              NaN        NaN   \n3    2016-08-01 11:11:11           NaN              NaN        NaN   \n4    2016-08-01 11:11:30           NaN              NaN        NaN   \n...                  ...           ...              ...        ...   \n3642 2016-08-20 22:06:33           NaN              NaN        NaN   \n3643 2016-08-20 22:07:31           NaN              NaN        NaN   \n3644 2016-08-20 22:07:47           NaN              NaN        NaN   \n3645 2016-08-20 22:08:38           NaN              NaN        NaN   \n3646 2016-08-20 22:09:17           NaN              NaN        NaN   \n\n      add_inprice  add_info  bar_code      picture_file  emp_id  \n0               0       NaN       NaN  caipu/104001.jpg    1442  \n1               0       NaN       NaN  caipu/202003.jpg    1442  \n2               0       NaN       NaN  caipu/303001.jpg    1442  \n3               0       NaN       NaN  caipu/105002.jpg    1442  \n4               0       NaN       NaN  caipu/503002.jpg    1442  \n...           ...       ...       ...               ...     ...  \n3642            0       NaN       NaN  caipu/601005.jpg    1110  \n3643            0       NaN       NaN  caipu/204003.jpg    1110  \n3644            0       NaN       NaN  caipu/301002.jpg    1110  \n3645            0       NaN       NaN  caipu/201006.jpg    1110  \n3646            0       NaN       NaN  caipu/204001.jpg    1110  \n\n[6426 rows x 19 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>detail_id</th>\n      <th>order_id</th>\n      <th>dishes_id</th>\n      <th>logicprn_name</th>\n      <th>parent_class_name</th>\n      <th>dishes_name</th>\n      <th>itemis_add</th>\n      <th>counts</th>\n      <th>amounts</th>\n      <th>cost</th>\n      <th>place_order_time</th>\n      <th>discount_amt</th>\n      <th>discount_reason</th>\n      <th>kick_back</th>\n      <th>add_inprice</th>\n      <th>add_info</th>\n      <th>bar_code</th>\n      <th>picture_file</th>\n      <th>emp_id</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>2956</td>\n      <td>417</td>\n      <td>610062</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>蒜蓉生蚝</td>\n      <td>0</td>\n      <td>1</td>\n      <td>49</td>\n      <td>NaN</td>\n      <td>2016-08-01 11:05:36</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/104001.jpg</td>\n      <td>1442</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>2958</td>\n      <td>417</td>\n      <td>609957</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>蒙古烤羊腿\\r\\n\\r\\n\\r\\n</td>\n      <td>0</td>\n      <td>1</td>\n      <td>48</td>\n      <td>NaN</td>\n      <td>2016-08-01 11:07:07</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/202003.jpg</td>\n      <td>1442</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>2961</td>\n      <td>417</td>\n      <td>609950</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>大蒜苋菜</td>\n      <td>0</td>\n      <td>1</td>\n      <td>30</td>\n      <td>NaN</td>\n      <td>2016-08-01 11:07:40</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/303001.jpg</td>\n      <td>1442</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>2966</td>\n      <td>417</td>\n      <td>610038</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>芝麻烤紫菜</td>\n      <td>0</td>\n      <td>1</td>\n      <td>25</td>\n      <td>NaN</td>\n      <td>2016-08-01 11:11:11</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/105002.jpg</td>\n      <td>1442</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>2968</td>\n      <td>417</td>\n      <td>610003</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>蒜香包</td>\n      <td>0</td>\n      <td>1</td>\n      <td>13</td>\n      <td>NaN</td>\n      <td>2016-08-01 11:11:30</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/503002.jpg</td>\n      <td>1442</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>3642</th>\n      <td>3856</td>\n      <td>1125</td>\n      <td>610011</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>白饭/大碗</td>\n      <td>0</td>\n      <td>1</td>\n      <td>10</td>\n      <td>NaN</td>\n      <td>2016-08-20 22:06:33</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/601005.jpg</td>\n      <td>1110</td>\n    </tr>\n    <tr>\n      <th>3643</th>\n      <td>3857</td>\n      <td>1125</td>\n      <td>610020</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>泡椒凤爪\\r\\n\\r\\n\\r\\n</td>\n      <td>0</td>\n      <td>1</td>\n      <td>58</td>\n      <td>NaN</td>\n      <td>2016-08-20 22:07:31</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/204003.jpg</td>\n      <td>1110</td>\n    </tr>\n    <tr>\n      <th>3644</th>\n      <td>3858</td>\n      <td>1125</td>\n      <td>610048</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>拌土豆丝</td>\n      <td>0</td>\n      <td>1</td>\n      <td>25</td>\n      <td>NaN</td>\n      <td>2016-08-20 22:07:47</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/301002.jpg</td>\n      <td>1110</td>\n    </tr>\n    <tr>\n      <th>3645</th>\n      <td>3859</td>\n      <td>1125</td>\n      <td>609996</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>牛尾汤</td>\n      <td>0</td>\n      <td>1</td>\n      <td>40</td>\n      <td>NaN</td>\n      <td>2016-08-20 22:08:38</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/201006.jpg</td>\n      <td>1110</td>\n    </tr>\n    <tr>\n      <th>3646</th>\n      <td>3860</td>\n      <td>1125</td>\n      <td>610018</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>照烧鸡腿\\r\\n\\r\\n\\r\\n</td>\n      <td>0</td>\n      <td>1</td>\n      <td>16</td>\n      <td>NaN</td>\n      <td>2016-08-20 22:09:17</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/204001.jpg</td>\n      <td>1110</td>\n    </tr>\n  </tbody>\n</table>\n<p>6426 rows × 19 columns</p>\n</div>"
     },
     "metadata": {},
     "execution_count": 30
    }
   ],
   "source": [
    "pd.concat([detail1,detail2],axis=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "      detail_id  order_id  dishes_id  logicprn_name  parent_class_name  \\\n0          2956       417     610062            NaN                NaN   \n1          2958       417     609957            NaN                NaN   \n2          2961       417     609950            NaN                NaN   \n3          2966       417     610038            NaN                NaN   \n4          2968       417     610003            NaN                NaN   \n...         ...       ...        ...            ...                ...   \n3642       3856      1125     610011            NaN                NaN   \n3643       3857      1125     610020            NaN                NaN   \n3644       3858      1125     610048            NaN                NaN   \n3645       3859      1125     609996            NaN                NaN   \n3646       3860      1125     610018            NaN                NaN   \n\n            dishes_name  itemis_add  counts  amounts  cost  \\\n0                  蒜蓉生蚝           0       1       49   NaN   \n1     蒙古烤羊腿\\r\\n\\r\\n\\r\\n           0       1       48   NaN   \n2                  大蒜苋菜           0       1       30   NaN   \n3                 芝麻烤紫菜           0       1       25   NaN   \n4                   蒜香包           0       1       13   NaN   \n...                 ...         ...     ...      ...   ...   \n3642              白饭/大碗           0       1       10   NaN   \n3643   泡椒凤爪\\r\\n\\r\\n\\r\\n           0       1       58   NaN   \n3644               拌土豆丝           0       1       25   NaN   \n3645                牛尾汤           0       1       40   NaN   \n3646   照烧鸡腿\\r\\n\\r\\n\\r\\n           0       1       16   NaN   \n\n        place_order_time  discount_amt  discount_reason  kick_back  \\\n0    2016-08-01 11:05:36           NaN              NaN        NaN   \n1    2016-08-01 11:07:07           NaN              NaN        NaN   \n2    2016-08-01 11:07:40           NaN              NaN        NaN   \n3    2016-08-01 11:11:11           NaN              NaN        NaN   \n4    2016-08-01 11:11:30           NaN              NaN        NaN   \n...                  ...           ...              ...        ...   \n3642 2016-08-20 22:06:33           NaN              NaN        NaN   \n3643 2016-08-20 22:07:31           NaN              NaN        NaN   \n3644 2016-08-20 22:07:47           NaN              NaN        NaN   \n3645 2016-08-20 22:08:38           NaN              NaN        NaN   \n3646 2016-08-20 22:09:17           NaN              NaN        NaN   \n\n      add_inprice  add_info  bar_code      picture_file  emp_id  \n0               0       NaN       NaN  caipu/104001.jpg    1442  \n1               0       NaN       NaN  caipu/202003.jpg    1442  \n2               0       NaN       NaN  caipu/303001.jpg    1442  \n3               0       NaN       NaN  caipu/105002.jpg    1442  \n4               0       NaN       NaN  caipu/503002.jpg    1442  \n...           ...       ...       ...               ...     ...  \n3642            0       NaN       NaN  caipu/601005.jpg    1110  \n3643            0       NaN       NaN  caipu/204003.jpg    1110  \n3644            0       NaN       NaN  caipu/301002.jpg    1110  \n3645            0       NaN       NaN  caipu/201006.jpg    1110  \n3646            0       NaN       NaN  caipu/204001.jpg    1110  \n\n[6426 rows x 19 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>detail_id</th>\n      <th>order_id</th>\n      <th>dishes_id</th>\n      <th>logicprn_name</th>\n      <th>parent_class_name</th>\n      <th>dishes_name</th>\n      <th>itemis_add</th>\n      <th>counts</th>\n      <th>amounts</th>\n      <th>cost</th>\n      <th>place_order_time</th>\n      <th>discount_amt</th>\n      <th>discount_reason</th>\n      <th>kick_back</th>\n      <th>add_inprice</th>\n      <th>add_info</th>\n      <th>bar_code</th>\n      <th>picture_file</th>\n      <th>emp_id</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>2956</td>\n      <td>417</td>\n      <td>610062</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>蒜蓉生蚝</td>\n      <td>0</td>\n      <td>1</td>\n      <td>49</td>\n      <td>NaN</td>\n      <td>2016-08-01 11:05:36</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/104001.jpg</td>\n      <td>1442</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>2958</td>\n      <td>417</td>\n      <td>609957</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>蒙古烤羊腿\\r\\n\\r\\n\\r\\n</td>\n      <td>0</td>\n      <td>1</td>\n      <td>48</td>\n      <td>NaN</td>\n      <td>2016-08-01 11:07:07</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/202003.jpg</td>\n      <td>1442</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>2961</td>\n      <td>417</td>\n      <td>609950</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>大蒜苋菜</td>\n      <td>0</td>\n      <td>1</td>\n      <td>30</td>\n      <td>NaN</td>\n      <td>2016-08-01 11:07:40</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/303001.jpg</td>\n      <td>1442</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>2966</td>\n      <td>417</td>\n      <td>610038</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>芝麻烤紫菜</td>\n      <td>0</td>\n      <td>1</td>\n      <td>25</td>\n      <td>NaN</td>\n      <td>2016-08-01 11:11:11</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/105002.jpg</td>\n      <td>1442</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>2968</td>\n      <td>417</td>\n      <td>610003</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>蒜香包</td>\n      <td>0</td>\n      <td>1</td>\n      <td>13</td>\n      <td>NaN</td>\n      <td>2016-08-01 11:11:30</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/503002.jpg</td>\n      <td>1442</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>3642</th>\n      <td>3856</td>\n      <td>1125</td>\n      <td>610011</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>白饭/大碗</td>\n      <td>0</td>\n      <td>1</td>\n      <td>10</td>\n      <td>NaN</td>\n      <td>2016-08-20 22:06:33</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/601005.jpg</td>\n      <td>1110</td>\n    </tr>\n    <tr>\n      <th>3643</th>\n      <td>3857</td>\n      <td>1125</td>\n      <td>610020</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>泡椒凤爪\\r\\n\\r\\n\\r\\n</td>\n      <td>0</td>\n      <td>1</td>\n      <td>58</td>\n      <td>NaN</td>\n      <td>2016-08-20 22:07:31</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/204003.jpg</td>\n      <td>1110</td>\n    </tr>\n    <tr>\n      <th>3644</th>\n      <td>3858</td>\n      <td>1125</td>\n      <td>610048</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>拌土豆丝</td>\n      <td>0</td>\n      <td>1</td>\n      <td>25</td>\n      <td>NaN</td>\n      <td>2016-08-20 22:07:47</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/301002.jpg</td>\n      <td>1110</td>\n    </tr>\n    <tr>\n      <th>3645</th>\n      <td>3859</td>\n      <td>1125</td>\n      <td>609996</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>牛尾汤</td>\n      <td>0</td>\n      <td>1</td>\n      <td>40</td>\n      <td>NaN</td>\n      <td>2016-08-20 22:08:38</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/201006.jpg</td>\n      <td>1110</td>\n    </tr>\n    <tr>\n      <th>3646</th>\n      <td>3860</td>\n      <td>1125</td>\n      <td>610018</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>照烧鸡腿\\r\\n\\r\\n\\r\\n</td>\n      <td>0</td>\n      <td>1</td>\n      <td>16</td>\n      <td>NaN</td>\n      <td>2016-08-20 22:09:17</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/204001.jpg</td>\n      <td>1110</td>\n    </tr>\n  </tbody>\n</table>\n<p>6426 rows × 19 columns</p>\n</div>"
     },
     "metadata": {},
     "execution_count": 31
    }
   ],
   "source": [
    "detail1.append(detail2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "      info_id  emp_id_x  number_consumers  mode  dining_table_id  \\\n0         417      1442                 4   NaN             1501   \n1         417      1442                 4   NaN             1501   \n2         417      1442                 4   NaN             1501   \n3         417      1442                 4   NaN             1501   \n4         417      1442                 4   NaN             1501   \n...       ...       ...               ...   ...              ...   \n2774      774      1138                 3   NaN             1500   \n2775      774      1138                 3   NaN             1500   \n2776      774      1138                 3   NaN             1500   \n2777      774      1138                 3   NaN             1500   \n2778      774      1138                 3   NaN             1500   \n\n      dining_table_name  expenditure  dishes_count  accounts_payable  \\\n0                  1022          165             5               165   \n1                  1022          165             5               165   \n2                  1022          165             5               165   \n3                  1022          165             5               165   \n4                  1022          165             5               165   \n...                 ...          ...           ...               ...   \n2774               1021          314             8               314   \n2775               1021          314             8               314   \n2776               1021          314             8               314   \n2777               1021          314             8               314   \n2778               1021          314             8               314   \n\n          use_start_time  ...  cost    place_order_time  discount_amt  \\\n0      2016/8/1 11:05:36  ...   NaN 2016-08-01 11:05:36           NaN   \n1      2016/8/1 11:05:36  ...   NaN 2016-08-01 11:07:07           NaN   \n2      2016/8/1 11:05:36  ...   NaN 2016-08-01 11:07:40           NaN   \n3      2016/8/1 11:05:36  ...   NaN 2016-08-01 11:11:11           NaN   \n4      2016/8/1 11:05:36  ...   NaN 2016-08-01 11:11:30           NaN   \n...                  ...  ...   ...                 ...           ...   \n2774  2016/8/10 21:50:35  ...   NaN 2016-08-10 21:56:24           NaN   \n2775  2016/8/10 21:50:35  ...   NaN 2016-08-10 21:56:48           NaN   \n2776  2016/8/10 21:50:35  ...   NaN 2016-08-10 22:01:52           NaN   \n2777  2016/8/10 21:50:35  ...   NaN 2016-08-10 22:03:58           NaN   \n2778  2016/8/10 21:50:35  ...   NaN 2016-08-10 22:04:30           NaN   \n\n      discount_reason  kick_back  add_inprice  add_info  bar_code  \\\n0                 NaN        NaN            0       NaN       NaN   \n1                 NaN        NaN            0       NaN       NaN   \n2                 NaN        NaN            0       NaN       NaN   \n3                 NaN        NaN            0       NaN       NaN   \n4                 NaN        NaN            0       NaN       NaN   \n...               ...        ...          ...       ...       ...   \n2774              NaN        NaN            0       NaN       NaN   \n2775              NaN        NaN            0       NaN       NaN   \n2776              NaN        NaN            0       NaN       NaN   \n2777              NaN        NaN            0       NaN       NaN   \n2778              NaN        NaN            0       NaN       NaN   \n\n          picture_file  emp_id_y  \n0     caipu/104001.jpg      1442  \n1     caipu/202003.jpg      1442  \n2     caipu/303001.jpg      1442  \n3     caipu/105002.jpg      1442  \n4     caipu/503002.jpg      1442  \n...                ...       ...  \n2774  caipu/601005.jpg      1138  \n2775  caipu/201006.jpg      1138  \n2776  caipu/404005.jpg      1138  \n2777  caipu/302003.jpg      1138  \n2778  caipu/302006.jpg      1138  \n\n[2779 rows x 40 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>info_id</th>\n      <th>emp_id_x</th>\n      <th>number_consumers</th>\n      <th>mode</th>\n      <th>dining_table_id</th>\n      <th>dining_table_name</th>\n      <th>expenditure</th>\n      <th>dishes_count</th>\n      <th>accounts_payable</th>\n      <th>use_start_time</th>\n      <th>...</th>\n      <th>cost</th>\n      <th>place_order_time</th>\n      <th>discount_amt</th>\n      <th>discount_reason</th>\n      <th>kick_back</th>\n      <th>add_inprice</th>\n      <th>add_info</th>\n      <th>bar_code</th>\n      <th>picture_file</th>\n      <th>emp_id_y</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>417</td>\n      <td>1442</td>\n      <td>4</td>\n      <td>NaN</td>\n      <td>1501</td>\n      <td>1022</td>\n      <td>165</td>\n      <td>5</td>\n      <td>165</td>\n      <td>2016/8/1 11:05:36</td>\n      <td>...</td>\n      <td>NaN</td>\n      <td>2016-08-01 11:05:36</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/104001.jpg</td>\n      <td>1442</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>417</td>\n      <td>1442</td>\n      <td>4</td>\n      <td>NaN</td>\n      <td>1501</td>\n      <td>1022</td>\n      <td>165</td>\n      <td>5</td>\n      <td>165</td>\n      <td>2016/8/1 11:05:36</td>\n      <td>...</td>\n      <td>NaN</td>\n      <td>2016-08-01 11:07:07</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/202003.jpg</td>\n      <td>1442</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>417</td>\n      <td>1442</td>\n      <td>4</td>\n      <td>NaN</td>\n      <td>1501</td>\n      <td>1022</td>\n      <td>165</td>\n      <td>5</td>\n      <td>165</td>\n      <td>2016/8/1 11:05:36</td>\n      <td>...</td>\n      <td>NaN</td>\n      <td>2016-08-01 11:07:40</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/303001.jpg</td>\n      <td>1442</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>417</td>\n      <td>1442</td>\n      <td>4</td>\n      <td>NaN</td>\n      <td>1501</td>\n      <td>1022</td>\n      <td>165</td>\n      <td>5</td>\n      <td>165</td>\n      <td>2016/8/1 11:05:36</td>\n      <td>...</td>\n      <td>NaN</td>\n      <td>2016-08-01 11:11:11</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/105002.jpg</td>\n      <td>1442</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>417</td>\n      <td>1442</td>\n      <td>4</td>\n      <td>NaN</td>\n      <td>1501</td>\n      <td>1022</td>\n      <td>165</td>\n      <td>5</td>\n      <td>165</td>\n      <td>2016/8/1 11:05:36</td>\n      <td>...</td>\n      <td>NaN</td>\n      <td>2016-08-01 11:11:30</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/503002.jpg</td>\n      <td>1442</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>2774</th>\n      <td>774</td>\n      <td>1138</td>\n      <td>3</td>\n      <td>NaN</td>\n      <td>1500</td>\n      <td>1021</td>\n      <td>314</td>\n      <td>8</td>\n      <td>314</td>\n      <td>2016/8/10 21:50:35</td>\n      <td>...</td>\n      <td>NaN</td>\n      <td>2016-08-10 21:56:24</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/601005.jpg</td>\n      <td>1138</td>\n    </tr>\n    <tr>\n      <th>2775</th>\n      <td>774</td>\n      <td>1138</td>\n      <td>3</td>\n      <td>NaN</td>\n      <td>1500</td>\n      <td>1021</td>\n      <td>314</td>\n      <td>8</td>\n      <td>314</td>\n      <td>2016/8/10 21:50:35</td>\n      <td>...</td>\n      <td>NaN</td>\n      <td>2016-08-10 21:56:48</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/201006.jpg</td>\n      <td>1138</td>\n    </tr>\n    <tr>\n      <th>2776</th>\n      <td>774</td>\n      <td>1138</td>\n      <td>3</td>\n      <td>NaN</td>\n      <td>1500</td>\n      <td>1021</td>\n      <td>314</td>\n      <td>8</td>\n      <td>314</td>\n      <td>2016/8/10 21:50:35</td>\n      <td>...</td>\n      <td>NaN</td>\n      <td>2016-08-10 22:01:52</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/404005.jpg</td>\n      <td>1138</td>\n    </tr>\n    <tr>\n      <th>2777</th>\n      <td>774</td>\n      <td>1138</td>\n      <td>3</td>\n      <td>NaN</td>\n      <td>1500</td>\n      <td>1021</td>\n      <td>314</td>\n      <td>8</td>\n      <td>314</td>\n      <td>2016/8/10 21:50:35</td>\n      <td>...</td>\n      <td>NaN</td>\n      <td>2016-08-10 22:03:58</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/302003.jpg</td>\n      <td>1138</td>\n    </tr>\n    <tr>\n      <th>2778</th>\n      <td>774</td>\n      <td>1138</td>\n      <td>3</td>\n      <td>NaN</td>\n      <td>1500</td>\n      <td>1021</td>\n      <td>314</td>\n      <td>8</td>\n      <td>314</td>\n      <td>2016/8/10 21:50:35</td>\n      <td>...</td>\n      <td>NaN</td>\n      <td>2016-08-10 22:04:30</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/302006.jpg</td>\n      <td>1138</td>\n    </tr>\n  </tbody>\n</table>\n<p>2779 rows × 40 columns</p>\n</div>"
     },
     "metadata": {},
     "execution_count": 38
    }
   ],
   "source": [
    "# 主键合并\n",
    "pd.merge(info,detail1,left_on='info_id',right_on='order_id')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "  key1  data1\n0    b      0\n1    b      1\n2    a      2\n3    c      3",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>key1</th>\n      <th>data1</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>b</td>\n      <td>0</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>b</td>\n      <td>1</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>a</td>\n      <td>2</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>c</td>\n      <td>3</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "metadata": {},
     "execution_count": 39
    }
   ],
   "source": [
    "df1=pd.DataFrame({'key1':['b','b','a','c'],'data1':range(4)})\n",
    "df1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "  key2  data2\n0    a      0\n1    b      1\n2    b      2\n3    d      3",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>key2</th>\n      <th>data2</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>a</td>\n      <td>0</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>b</td>\n      <td>1</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>b</td>\n      <td>2</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>d</td>\n      <td>3</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "metadata": {},
     "execution_count": 40
    }
   ],
   "source": [
    "df2=pd.DataFrame({'key2':['a','b','b','d'],'data2':range(4)})\n",
    "df2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "  key1  data1 key2  data2\n0    b      0    b      1\n1    b      0    b      2\n2    b      1    b      1\n3    b      1    b      2\n4    a      2    a      0",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>key1</th>\n      <th>data1</th>\n      <th>key2</th>\n      <th>data2</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>b</td>\n      <td>0</td>\n      <td>b</td>\n      <td>1</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>b</td>\n      <td>0</td>\n      <td>b</td>\n      <td>2</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>b</td>\n      <td>1</td>\n      <td>b</td>\n      <td>1</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>b</td>\n      <td>1</td>\n      <td>b</td>\n      <td>2</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>a</td>\n      <td>2</td>\n      <td>a</td>\n      <td>0</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "metadata": {},
     "execution_count": 41
    }
   ],
   "source": [
    "pd.merge(df1,df2,left_on='key1',right_on='key2',how='inner')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "  key1  data1 key2  data2\n0    b    0.0    b    1.0\n1    b    0.0    b    2.0\n2    b    1.0    b    1.0\n3    b    1.0    b    2.0\n4    a    2.0    a    0.0\n5    c    3.0  NaN    NaN\n6  NaN    NaN    d    3.0",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>key1</th>\n      <th>data1</th>\n      <th>key2</th>\n      <th>data2</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>b</td>\n      <td>0.0</td>\n      <td>b</td>\n      <td>1.0</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>b</td>\n      <td>0.0</td>\n      <td>b</td>\n      <td>2.0</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>b</td>\n      <td>1.0</td>\n      <td>b</td>\n      <td>1.0</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>b</td>\n      <td>1.0</td>\n      <td>b</td>\n      <td>2.0</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>a</td>\n      <td>2.0</td>\n      <td>a</td>\n      <td>0.0</td>\n    </tr>\n    <tr>\n      <th>5</th>\n      <td>c</td>\n      <td>3.0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n    </tr>\n    <tr>\n      <th>6</th>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>d</td>\n      <td>3.0</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "metadata": {},
     "execution_count": 42
    }
   ],
   "source": [
    "pd.merge(df1,df2,left_on='key1',right_on='key2',how='outer')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "  key1  data1 key2  data2\n0    b      0    b    1.0\n1    b      0    b    2.0\n2    b      1    b    1.0\n3    b      1    b    2.0\n4    a      2    a    0.0\n5    c      3  NaN    NaN",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>key1</th>\n      <th>data1</th>\n      <th>key2</th>\n      <th>data2</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>b</td>\n      <td>0</td>\n      <td>b</td>\n      <td>1.0</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>b</td>\n      <td>0</td>\n      <td>b</td>\n      <td>2.0</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>b</td>\n      <td>1</td>\n      <td>b</td>\n      <td>1.0</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>b</td>\n      <td>1</td>\n      <td>b</td>\n      <td>2.0</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>a</td>\n      <td>2</td>\n      <td>a</td>\n      <td>0.0</td>\n    </tr>\n    <tr>\n      <th>5</th>\n      <td>c</td>\n      <td>3</td>\n      <td>NaN</td>\n      <td>NaN</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "metadata": {},
     "execution_count": 43
    }
   ],
   "source": [
    "pd.merge(df1,df2,left_on='key1',right_on='key2',how='left')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "  key1  data1 key2  data2\n0    b    0.0    b      1\n1    b    1.0    b      1\n2    b    0.0    b      2\n3    b    1.0    b      2\n4    a    2.0    a      0\n5  NaN    NaN    d      3",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>key1</th>\n      <th>data1</th>\n      <th>key2</th>\n      <th>data2</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>b</td>\n      <td>0.0</td>\n      <td>b</td>\n      <td>1</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>b</td>\n      <td>1.0</td>\n      <td>b</td>\n      <td>1</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>b</td>\n      <td>0.0</td>\n      <td>b</td>\n      <td>2</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>b</td>\n      <td>1.0</td>\n      <td>b</td>\n      <td>2</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>a</td>\n      <td>2.0</td>\n      <td>a</td>\n      <td>0</td>\n    </tr>\n    <tr>\n      <th>5</th>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>d</td>\n      <td>3</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "metadata": {},
     "execution_count": 44
    }
   ],
   "source": [
    "pd.merge(df1,df2,left_on='key1',right_on='key2',how='right')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [],
   "source": [
    "info.rename(columns={'info_id':'order_id'},inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "     order_id  emp_id  number_consumers  mode  dining_table_id  \\\n0         417    1442                 4   NaN             1501   \n1         301    1095                 3   NaN             1430   \n2         413    1147                 6   NaN             1488   \n3         415    1166                 4   NaN             1502   \n4         392    1094                10   NaN             1499   \n..        ...     ...               ...   ...              ...   \n940       641    1095                 8   NaN             1492   \n941       672    1089                 6   NaN             1489   \n942       692    1155                 8   NaN             1492   \n943       647    1094                 4   NaN             1485   \n944       570    1113                 8   NaN             1517   \n\n     dining_table_name  expenditure  dishes_count  accounts_payable  \\\n0                 1022          165             5               165   \n1                 1031          321             6               321   \n2                 1009          854            15               854   \n3                 1023          466            10               466   \n4                 1020          704            24               704   \n..                 ...          ...           ...               ...   \n940               1013          679            12               679   \n941               1010          800            24               800   \n942               1013          735            10               735   \n943               1006          262             9               262   \n944               1038          589            13               589   \n\n         use_start_time  ...  cost    place_order_time  discount_amt  \\\n0     2016/8/1 11:05:36  ...   NaN 2016-08-03 17:42:38           NaN   \n1     2016/8/1 11:15:57  ...   NaN 2016-08-02 19:00:21           NaN   \n2     2016/8/1 12:42:52  ...   NaN 2016-08-03 17:38:56           NaN   \n3     2016/8/1 12:51:38  ...   NaN 2016-08-03 17:41:24           NaN   \n4     2016/8/1 12:58:44  ...   NaN 2016-08-03 14:07:30           NaN   \n..                  ...  ...   ...                 ...           ...   \n940  2016/8/31 21:23:48  ...   NaN 2016-08-04 21:59:03           NaN   \n941  2016/8/31 21:24:12  ...   NaN 2016-08-05 12:41:35           NaN   \n942  2016/8/31 21:25:18  ...   NaN 2016-08-05 13:44:40           NaN   \n943  2016/8/31 21:37:39  ...   NaN 2016-08-04 22:02:54           NaN   \n944  2016/8/31 21:41:56  ...   NaN 2016-08-04 18:24:55           NaN   \n\n     discount_reason  kick_back  add_inprice  add_info  bar_code  \\\n0                NaN        NaN            0       NaN       NaN   \n1                NaN        NaN            0       NaN       NaN   \n2                NaN        NaN            0       NaN       NaN   \n3                NaN        NaN            0       NaN       NaN   \n4                NaN        NaN            0       NaN       NaN   \n..               ...        ...          ...       ...       ...   \n940              NaN        NaN            0       NaN       NaN   \n941              NaN        NaN            0       NaN       NaN   \n942              NaN        NaN            0       NaN       NaN   \n943              NaN        NaN            0       NaN       NaN   \n944              NaN        NaN            0       NaN       NaN   \n\n         picture_file  emp_id1  \n0    caipu/401001.jpg     1204  \n1    caipu/303001.jpg     1103  \n2    caipu/305003.jpg     1204  \n3    caipu/602005.jpg     1204  \n4    caipu/403001.jpg      997  \n..                ...      ...  \n940  caipu/303004.jpg     1163  \n941  caipu/101006.jpg     1206  \n942  caipu/304004.jpg     1226  \n943  caipu/303003.jpg     1163  \n944  caipu/205003.jpg     1597  \n\n[945 rows x 40 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>order_id</th>\n      <th>emp_id</th>\n      <th>number_consumers</th>\n      <th>mode</th>\n      <th>dining_table_id</th>\n      <th>dining_table_name</th>\n      <th>expenditure</th>\n      <th>dishes_count</th>\n      <th>accounts_payable</th>\n      <th>use_start_time</th>\n      <th>...</th>\n      <th>cost</th>\n      <th>place_order_time</th>\n      <th>discount_amt</th>\n      <th>discount_reason</th>\n      <th>kick_back</th>\n      <th>add_inprice</th>\n      <th>add_info</th>\n      <th>bar_code</th>\n      <th>picture_file</th>\n      <th>emp_id1</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>417</td>\n      <td>1442</td>\n      <td>4</td>\n      <td>NaN</td>\n      <td>1501</td>\n      <td>1022</td>\n      <td>165</td>\n      <td>5</td>\n      <td>165</td>\n      <td>2016/8/1 11:05:36</td>\n      <td>...</td>\n      <td>NaN</td>\n      <td>2016-08-03 17:42:38</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/401001.jpg</td>\n      <td>1204</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>301</td>\n      <td>1095</td>\n      <td>3</td>\n      <td>NaN</td>\n      <td>1430</td>\n      <td>1031</td>\n      <td>321</td>\n      <td>6</td>\n      <td>321</td>\n      <td>2016/8/1 11:15:57</td>\n      <td>...</td>\n      <td>NaN</td>\n      <td>2016-08-02 19:00:21</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/303001.jpg</td>\n      <td>1103</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>413</td>\n      <td>1147</td>\n      <td>6</td>\n      <td>NaN</td>\n      <td>1488</td>\n      <td>1009</td>\n      <td>854</td>\n      <td>15</td>\n      <td>854</td>\n      <td>2016/8/1 12:42:52</td>\n      <td>...</td>\n      <td>NaN</td>\n      <td>2016-08-03 17:38:56</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/305003.jpg</td>\n      <td>1204</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>415</td>\n      <td>1166</td>\n      <td>4</td>\n      <td>NaN</td>\n      <td>1502</td>\n      <td>1023</td>\n      <td>466</td>\n      <td>10</td>\n      <td>466</td>\n      <td>2016/8/1 12:51:38</td>\n      <td>...</td>\n      <td>NaN</td>\n      <td>2016-08-03 17:41:24</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/602005.jpg</td>\n      <td>1204</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>392</td>\n      <td>1094</td>\n      <td>10</td>\n      <td>NaN</td>\n      <td>1499</td>\n      <td>1020</td>\n      <td>704</td>\n      <td>24</td>\n      <td>704</td>\n      <td>2016/8/1 12:58:44</td>\n      <td>...</td>\n      <td>NaN</td>\n      <td>2016-08-03 14:07:30</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/403001.jpg</td>\n      <td>997</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>940</th>\n      <td>641</td>\n      <td>1095</td>\n      <td>8</td>\n      <td>NaN</td>\n      <td>1492</td>\n      <td>1013</td>\n      <td>679</td>\n      <td>12</td>\n      <td>679</td>\n      <td>2016/8/31 21:23:48</td>\n      <td>...</td>\n      <td>NaN</td>\n      <td>2016-08-04 21:59:03</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/303004.jpg</td>\n      <td>1163</td>\n    </tr>\n    <tr>\n      <th>941</th>\n      <td>672</td>\n      <td>1089</td>\n      <td>6</td>\n      <td>NaN</td>\n      <td>1489</td>\n      <td>1010</td>\n      <td>800</td>\n      <td>24</td>\n      <td>800</td>\n      <td>2016/8/31 21:24:12</td>\n      <td>...</td>\n      <td>NaN</td>\n      <td>2016-08-05 12:41:35</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/101006.jpg</td>\n      <td>1206</td>\n    </tr>\n    <tr>\n      <th>942</th>\n      <td>692</td>\n      <td>1155</td>\n      <td>8</td>\n      <td>NaN</td>\n      <td>1492</td>\n      <td>1013</td>\n      <td>735</td>\n      <td>10</td>\n      <td>735</td>\n      <td>2016/8/31 21:25:18</td>\n      <td>...</td>\n      <td>NaN</td>\n      <td>2016-08-05 13:44:40</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/304004.jpg</td>\n      <td>1226</td>\n    </tr>\n    <tr>\n      <th>943</th>\n      <td>647</td>\n      <td>1094</td>\n      <td>4</td>\n      <td>NaN</td>\n      <td>1485</td>\n      <td>1006</td>\n      <td>262</td>\n      <td>9</td>\n      <td>262</td>\n      <td>2016/8/31 21:37:39</td>\n      <td>...</td>\n      <td>NaN</td>\n      <td>2016-08-04 22:02:54</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/303003.jpg</td>\n      <td>1163</td>\n    </tr>\n    <tr>\n      <th>944</th>\n      <td>570</td>\n      <td>1113</td>\n      <td>8</td>\n      <td>NaN</td>\n      <td>1517</td>\n      <td>1038</td>\n      <td>589</td>\n      <td>13</td>\n      <td>589</td>\n      <td>2016/8/31 21:41:56</td>\n      <td>...</td>\n      <td>NaN</td>\n      <td>2016-08-04 18:24:55</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>0</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>caipu/205003.jpg</td>\n      <td>1597</td>\n    </tr>\n  </tbody>\n</table>\n<p>945 rows × 40 columns</p>\n</div>"
     },
     "metadata": {},
     "execution_count": 47
    }
   ],
   "source": [
    "info.join(detail1,on='order_id',rsuffix='1')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [],
   "source": [
    "dist1=pd.DataFrame({'id':range(1,10),'cpu':['i7','i5',np.nan,'i7','i7','i5',np.nan,np.nan,np.nan]})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [],
   "source": [
    "dist2=pd.DataFrame({'id':range(1,10),'cpu':['i7','i5','i5','i7',np.nan,'i5','i5',np.nan,'i5']})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "   id  cpu\n0   1   i7\n1   2   i5\n2   3   i5\n3   4   i7\n4   5   i7\n5   6   i5\n6   7   i5\n7   8  NaN\n8   9   i5",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>id</th>\n      <th>cpu</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>1</td>\n      <td>i7</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>2</td>\n      <td>i5</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>3</td>\n      <td>i5</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>4</td>\n      <td>i7</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>5</td>\n      <td>i7</td>\n    </tr>\n    <tr>\n      <th>5</th>\n      <td>6</td>\n      <td>i5</td>\n    </tr>\n    <tr>\n      <th>6</th>\n      <td>7</td>\n      <td>i5</td>\n    </tr>\n    <tr>\n      <th>7</th>\n      <td>8</td>\n      <td>NaN</td>\n    </tr>\n    <tr>\n      <th>8</th>\n      <td>9</td>\n      <td>i5</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "metadata": {},
     "execution_count": 51
    }
   ],
   "source": [
    "dist1.combine_first(dist2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ]
}